package userLimitService

import (
	"arabApi/app/api/models/userlimitModel"
	"arabApi/app/api/requests"
	"arabApi/app/api/requests/userlimitRequest"

	"github.com/spf13/cast"
)

func MenuList(r requests.PageStruct) ([]TreeList1, int64) {
	users := userlimitModel.MenuList1()
	ll := getMenu1(users, 0)
	return ll, 0
}

func MenuAdd(r userlimitRequest.MenuAdd) uint64 {
	menu := new(userlimitModel.Menu)
	return menu.MenuAdd(r)
}

func MenuEdit(r userlimitRequest.MenuAdd) error {
	menu := new(userlimitModel.Menu)
	return menu.MenuEdit(r)
}

func MenurMsg(id string) userlimitModel.Menu {
	return userlimitModel.MenuMsg(cast.ToInt64(id))
}
